package cn.iocoder.an.module.business.controller.admin.keeptask.vo;

import cn.iocoder.an.module.business.controller.admin.equipmnetkeepwait.vo.EquipmnetKeepWaitRespVO;
import cn.iocoder.an.module.business.dal.dataobject.equipmentkeepsettingtype.EquipmentKeepSettingTypeDO;
import cn.iocoder.an.module.business.dal.dataobject.equipmentmanage.EquipmentManageDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;

@Schema(description = "管理后台 - 保养任务 Response VO")
@Data
@ExcelIgnoreUnannotated
public class KeepTaskRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28301")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "待保养ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30048")
    @ExcelProperty("待保养ID")
    private Long waitId;

    @Schema(description = "设备id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21186")
    @ExcelProperty("设备id")
    @Trans(type = TransType.SIMPLE, target = EquipmentManageDO.class,   fields = {"equipmentName","deptName","equipmentModel","code"},refs = {"equipmentName","deptName","equipmentModel","equipmentCode"})
    private Long equipmentId;

    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "xxx")
    @ExcelProperty("设备名称")
    private String equipmentName;

    private String equipmentCode;

    @Schema(description = "规格型号", requiredMode = Schema.RequiredMode.REQUIRED, example = "xxx")
    @ExcelProperty("规格型号")
    private String equipmentModel;

    @Schema(description = "开始时间")
    @ExcelProperty("开始时间")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @ExcelProperty("结束时间")
    private LocalDateTime endTime;

    @Schema(description = "审核人ID", example = "17391")
    @ExcelProperty("审核人ID")
    private List<Long> reviewerId;

    @Schema(description = "审核人名称", example = "赵六")
    @ExcelProperty("审核人名称")
    private String reviewerName;

    @Schema(description = "保养项id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20811")
    @ExcelProperty("保养项id")
    @Trans(type = TransType.SIMPLE, target = EquipmentKeepSettingTypeDO.class,   fields = {"name"},refs = {"itemName"})
    private Long itemId;

    @Schema(description = "保养项名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "xxx")
    private String itemName;

    @Schema(description = "保养周期", requiredMode = Schema.RequiredMode.REQUIRED, example = "180")
    private String cycle;


    @Schema(description = "待保养明细ID", example = "22032")
    @ExcelProperty("待保养明细ID")
    private String itemSubId;

    @Schema(description = "已完成的保养明细ID")
    @ExcelProperty("已完成的保养明细ID")
    private List<Long> itemSubComplete;

    @Schema(description = "补充说明", example = "随便")
    @ExcelProperty("补充说明")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "派工时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime acceptTime;

    @Schema(description = "保养工时", requiredMode = Schema.RequiredMode.REQUIRED)
    private Double hours;

    @Schema(description = "是否合格1是2否", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer pass;

    @Schema(description = "审核备注", requiredMode = Schema.RequiredMode.REQUIRED)
    private String remark;

    //关联的待保养对象
    private EquipmnetKeepWaitRespVO waitRespVO;

    private String dutyUserName;


    private List<String> files;

}